import {apiClient} from "@/utils/request";


//添加商品到购物车

export const saveCartFun = (data:any) => {
    return apiClient({
      url: '/recruit/userCollection/add',
      method: 'post',
      data:data
    })
  };

  // 获取购物车列表
export const getAllCartFun = (id:number) => {
    return apiClient({
      url: '/recruit/interview/getInfoByUserId/'+id,
      method: 'get'
    })
  };



export const getAllIntiewerFun = (id:number) => {
    return apiClient({
        url: '/recruit/interview/getInfoByUserId/'+id,
        method: 'get'
    })
};




  // 删除购物车
export const DeleteByIdCartFun = (id:number,ids:number) => {
    return apiClient({
      url: '/recruit/userCollection/deleteById/'+id+'/'+ids,
      method: 'delete',
    })
  };

// 修改购物车的选中状态
export const UpdateSelectCartFun = (data:any) => {
  return apiClient({
    url: '/car/cart-info/updateSelect',
    method: 'put',
    data: data
  })
};


